package com.crm.dao.mapper.customMapper.exchange;

import com.crm.common.model.DhPageInfo;
import com.crm.model.qo.finishOrderProductManager.FinishOrderProductQO;
import com.crm.model.vo.csd.product.ChangeCourseRecordVO;
import com.crm.model.vo.customerContractManager.CustomerChangeCourseRecordVO;
import com.crm.model.vo.exchangeProductsRecord.ExchangeProductsRecordVO;
import com.crm.model.vo.exchangeProductsRecord.ProductExchangeFormVO;
import com.crm.model.vo.exchangeProductsRecord.ProductExchangeaApprovalVO;
import com.crm.model.vo.finishOrderProduct.FinishOrderProductVO;
import com.crm.model.vo.productManager.CustomerMemberProductVO;
import com.crm.model.vo.productManager.CustomerProductVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author wangpeng
 * @Date 2021/9/1 13:53
 */
public interface ProductDetailsCustomMapper {
    /**
     * selectProductDetailsList
     *    产品管理 --产品明细
     * @Author wangpeng
     * @Date 2021/9/1
     * @param order
     * @param qo
     * @param dateUnit
     * @return
     */
    List<FinishOrderProductVO> selectProductDetailsList(@Param("order") String order,@Param("qo") FinishOrderProductQO qo,@Param("dateUnit") Integer dateUnit,@Param("contractOtherType")String contractOtherType);

    /**
     * selectCustomerMemberProductList
     * 产品管理--产品明细--会员高级筛选
     * @Author wangpeng
     * @Date 2021/9/2
     * @param productStatus
     * @return
     */
    List<CustomerMemberProductVO> selectCustomerMemberProductList(@Param("productStatus")Integer productStatus);

    /**
     * selectCustomerProductList
     * 产品管理--产品明细--非会员高级筛选
     * @Author wangpeng
     * @Date 2021/9/3
     * @param shelfStatus
     * @return
     */
    List<CustomerProductVO> selectCustomerProductList(@Param("shelfStatus")Integer shelfStatus);

    /**
     * selectChangeCourseCecordList
     * @Author wangpeng
     * @Date 2021/10/22
     * @param order
     * @return
     */
    List<CustomerChangeCourseRecordVO> selectChangeCourseCecordList(@Param("order")String order,@Param("vo") ChangeCourseRecordVO vo);

    List<ChangeCourseRecordVO> selectChangeCourseCecordRuleNumber();

    CustomerChangeCourseRecordVO selectChangeCourseCecordById(@Param("changeCourseId")String changeCourseId);

    void updateChangeCourseCecord(@Param("changeCourseId")String changeCourseId,@Param("examine")String examine,@Param("remarks")String remarks,@Param("accountId") String accountId, @Param("date")Date date,@Param("xcch")String xcch,@Param("hyhsycs")String hyhsycs);

    List<CustomerChangeCourseRecordVO> selectExchangeCenterList(@Param("order")String order, @Param("vo")ChangeCourseRecordVO vo,@Param("accountId") String accountId);

    List<CustomerChangeCourseRecordVO> selectExamineAndApproveList(@Param("finishOrderProductId")String finishOrderProductId);

    ChangeCourseRecordVO selectExchangeDetails(@Param("changeCourseId")String changeCourseId);

    CustomerChangeCourseRecordVO selectViewDetails(@Param("changeCourseId")String changeCourseId);

    List<FinishOrderProductVO> selectExchangeOrderProductList(@Param("order")String order,@Param("orderNumber") String orderNumber,@Param("accountId")String accountId);

    List<FinishOrderProductVO> selectExchangeOrderProductByorderNumber(@Param("orderNumber")String orderNumber,@Param("accountId")String accountId);

    void addExchangeProductsRecord(@Param("vo")ExchangeProductsRecordVO vo);

    void addProductExchangeApproval(@Param("vo")ProductExchangeaApprovalVO vo);

    List<ProductExchangeaApprovalVO> selectProductExchangeApprovalList(@Param("order")String order);

    void updateProductExchangeApproval(@Param("productExchangeApprovalId")String productExchangeApprovalId,@Param("approvalStatus")String approvalStatus, @Param("date")Date date,@Param("approvalRemarks")String approvalRemarks,@Param("accountId")String accountId);

    List<ExchangeProductsRecordVO> selectProductExchangeApprovalByExchangeNumber(@Param("exchangeNumber") String exchangeNumber);

    void updateFinishOrderProduct(@Param("finishOrderProductId")String finishOrderProductId);

    void addProductExchangeform(@Param("vo")ProductExchangeFormVO vo);

    List<ProductExchangeFormVO> selectProductExchangeFormList(@Param("orderNumber")String orderNumber,@Param("accountId")String accountId);

    List<ExchangeProductsRecordVO> selectProductExchangeApprovalByType(@Param("exchangeNumber")String exchangeNumber);

    List<ProductExchangeaApprovalVO> selectProductExchangeApprovaLByOrderNumber(@Param("orderNumber")String orderNumber);

    void updateProductExchangeForm(@Param("orderNumber")String orderNumber);

    void deleteProductExchangeFormByProductExchangeId(@Param("productExchangeId")String productExchangeId);

    void updateExchangeProductsRecord(@Param("exchangeNumber")String exchangeNumber,@Param("type")String type);

    void deleteRroductExchangeForm(@Param("productExchangeId")String productExchangeId);

    List<CustomerProductVO> selectExchangeCustomerProductList(@Param("productName")String productName);

    List<CustomerMemberProductVO> selectExchangeCustomerMemberProductList(@Param("memberCardName")String memberCardName);

    ProductExchangeaApprovalVO selectApprovedform(@Param("productExchangeApprovalId") String productExchangeApprovalId);
}
